package com.xzc.refactory.object.moveMethod.c1;

public class Account {
    private AccountType _type;
    private int _dayOverdrawn;

    double overdraftCharge() {
        if (_type.isPremium()) {
            double result = 10;
            if (_dayOverdrawn > 7) result += (_dayOverdrawn - 7) * 0.85;
            return result;
        } else return _dayOverdrawn * 1.75;
    }

    double bankCharge() {
        double result = 4.5;
        if (_dayOverdrawn > 0) result += overdraftCharge();
        return result;
    }
}
